﻿
@{
    ViewData["Title"] = "jiankang";
    Layout = "~/Views/Shared/_List.cshtml";
}

<div class="layui-row">
    <div class="layui-col-md12">
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title">
                <li class="layui-this">河流</li>
                <li>湖泊</li>
                <li>水库</li>
                <li>沟渠</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="kit-table">
                        <div class="kit-table-header" style="position:absolute;top:-60px;right:30px;">
                            <div class="kit-search-inputs">
                                <div class="kit-search-keyword">
                                    <input type="text" class="layui-input" name="keyword" id="keyword" placeholder="输入关键词搜索.." />
                                    <button href="javascript:;" onclick="initGrid()"><i class="layui-icon">&#xe615;</i></button>
                                </div>
                            </div>
                        </div>
                        <div id="toolbar">
                        </div>
                        <div class="kit-table-body">
                            <table class="layui-table" lay-data="{height:'full-75', url:'/TestData/pingjia.json',method:'get', page:true, id:'TableList',toolbar:'#toolbar',defaultToolbar: ['filter', 'print', 'exports']}" lay-filter="demo">
                                <thead>
                                    <tr>
                                        <th lay-data="{field:'name', sort: true}">名称</th>
                                        <th lay-data="{field:'szy', width:160, sort: true,align:'center',event: 'setSign', style:'cursor: pointer;'}">水资源保护</th>
                                        <th lay-data="{field:'syhx', width:160, sort: true,align:'center'}">水域岸线管理保护</th>
                                        <th lay-data="{field:'swr', width:160, sort: true,align:'center'}">水污染防治</th>
                                        <th lay-data="{field:'shj', width:160, sort: true,align:'center'}">水环境治理</th>
                                        <th lay-data="{field:'sst', width:160, sort: true,align:'center'}">水生态修复</th>
                                        <th lay-data="{field:'zfjg', width:160, sort: true,align:'center'}">执法监管</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-tab-item">湖泊</div>
                <div class="layui-tab-item">水库</div>
                <div class="layui-tab-item">沟渠</div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(['element', 'table'], function () {
        var $ = layui.jquery
            , element = layui.element//Tab的切换功能，切换事件监听等，需要依赖element模块
            , table = layui.table;
        table.on('tool(demo)', function (obj) {
            var data = obj.data;
            if (obj.event === 'setSign') {
                layer.open({
                    type: 2,
                    title: data.name+'-水资源保护',
                    area: ['300px', '270px'],
                    content: '/Home/szybh'
                });
            }
        });
    });
</script>


